<template>
      <div class="filter">
        <div class="filter-title">{{title}}：</div>
        <div class="filter-box">
          <div v-for="item in list" :key="(item as string)" :class="['filter-item', { 'active': selectList.includes(item) }]">
            {{ item }}
          </div>
        </div>
      </div>
</template>
<script lang="ts" setup>
defineProps({
  list: {
    type: Array,
    default: () => []
  },
  selectList: {
    type: Array,
    default: () => []
  },
  title: {
    type: String,
    default: ''
  }
})

</script>

<style lang="less" scoped>
@import "./index.less";
</style>
